
package edu.tongji.jiaowu.dao.jdbc;
 
import java.util.List;

import edu.tongji.jiaowu.dao.EvClassDao;
import com.tongji.quickCRUDQ.define.Row;
import com.tongji.quickCRUDQ.model.CommonBean;
import com.tongji.quickCRUDQ.dao.jdbc.BaseDaoJdbc;

public class EvClassDaoJdbc extends BaseDaoJdbc implements EvClassDao {
	String tableName="T_EV_CLASS";
	String beanName="evClass";
	
	public CommonBean createEvClass(){
		CommonBean evClasss=this.createBean(tableName,beanName);
                return evClasss;		
	}
	
/*
	public CommonBean findEvClasss(String refid) {
		CommonBean evClasss=this.createEvClass();
		String sql="select * from T_EV_CLASS where refid=?";
		List data=this.getCommonDao().select(sql,new String[]{refid});
		evClasss.addData(data);
                return evClasss;
       }
*/
	public CommonBean findEvClassById(String id) {
		CommonBean evClasss=this.createEvClass();
		String sql="select * from T_EV_CLASS where id=?";
		List data=this.getCommonDao().select(sql,new String[]{id});
		evClasss.addData(data);
    return evClasss;
  }
  
	public CommonBean findAllEvClasss() {
		CommonBean evClasss=this.createEvClass();
		String sql="select * from T_EV_CLASS ";
		List data=this.getCommonDao().select(sql,new String[]{});
		evClasss.addData(data);
    return evClasss;
  }
	public void insertEvClass(CommonBean evClassBean){
		List data=evClassBean.getData();
		Row row=this.getRow(tableName);
		this.getCommonDao().templateBatchInsert(row,data,this.getIdGenerator());
	}
	public void updateEvClass(CommonBean evClassBean){
		List data=evClassBean.getData();
		Row row=this.getRow(tableName);
		this.getCommonDao().templateBatchUpdate(row,data);
	}
}

